<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
<title><?= $sf_response->getTitle() ?></title>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<div id="sf_admin_container">
<h1>PO configuration</h1>
<?php  if ($sf_user->hasFlash('notice')): ?>
<div class="save-ok">
<h2><?php echo __($sf_user->getFlash('notice')) ?></h2>
</div>
<?php endif; ?>


<div id="sf_admin_content">
<fieldset>

<?php echo form_tag('po/config', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
  'onsubmit'=>'return requireFill()',
)) ?>

<div class="form-row">
  <?php echo label_for('notes', 'Contact Person:', 'class="required" ') ?>
  <div class="content">

  <textarea name="contactperson" id="contactperson" rows="7" cols="70"><?php echo $contactperson?></textarea>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('notes', 'Document Requirement:', 'class="required" ') ?>
  <div class="content">

  <textarea name="docrequire" id="docrequire" rows="7" cols="70"><?php echo $docrequire?></textarea>
    </div>
</div>


<div class="form-row">
  <?php echo label_for('notes', 'Full Print Template:', 'class="required" ') ?>
  <div class="content">

    <INPUT TYPE=RADIO NAME="printTemplate" VALUE="F" <? if (isset($printTemplate) && $printTemplate=='F') echo "CHECKED"; ?> >Full Template
    <INPUT TYPE=RADIO NAME="printTemplate" VALUE="S" <? if (!isset($printTemplate) || $printTemplate!='F') echo "CHECKED"; ?> >Simple Template
  </div>
</div>


</fieldset>
<ul class="sf_admin_actions">
<li>
<?
echo submit_tag(__('change'), array (
      'name' => 'save',
      'class' => 'sf_admin_action_save',
    )) ;
    ?>
</li>
</ul>
</form>
</div>
</div>
<script language="JavaScript">
function requireFill(){
    var notes = document.getElementById('contactperson');
    if (!notes.value){
        alert ('Please enter the contact person!');
        notes.focus();
        return false;
    }
    notes = document.getElementById('docrequire');
    if (!notes.value){
        alert ('Please enter the Document Requirement!');
        notes.focus();
        return false;
    }
}
</script>